import request from '@/utils/http'


// 获取banner

export function getBannerAPI (params) {
  // 默认为1 商品为2
  const { distributionSite = '1' } = params
  return request({
    url: '/gscloud_multishop/ua/index_img/list',
    params: params
  })
}

/**
 * @description: 获取新鲜好物
 * @param {*}
 * @return {*}
 */
export const findNewAPI = () => {
  return request({
    url: '/home/new'
  })
}

/**
 * @description: 获取人气推荐
 * @param {*}
 * @return {*}
 */
export const getHotAPI = () => {
  return request({
    url: '/home/hot'
  })
}

/**
 * @description: 获取所有商品模块
 * @param {*}
 * @return {*}
 */
export const getGoodsAPI = (params) => {
  return request({
    url: '/gscloud_search/ua/search/page',
	method: 'GET',
	params: params
  })
}

//获取全部分类标签
export const getCategoryAPI = (params) => {
  return request({
    url: '/gscloud_product/ua/category/shop_category_list',
	method: 'GET',
	params: params
  })
}
export const getProdInfoAPI = (params) => {
  return request({
    url: '/gscloud_product/ua/spu/prod_info',
	method: 'GET',
	params: params
  })
}